Use American spelling throughout - #7180
Merged
Merged
Conversation
LMFDB uses American spelling, but a number of British forms had accumulated: behaviour, centre/centred, colour, favourite, fibre, judgement, labelled/labelling, amongst, whilst, acknowledgements, and the -ise family (initialise, normalise, renormalise, factorise, recognise, prioritise, optimise, standardise, desynchronise). Two of these were also wrong on the facts. The CONTRIBUTORS.yaml header pointed at /acknowledgement, but the route is /acknowledgment (app.py). And abstract groups was the only section of roughly twenty-five offering "Source and acknowledgements"; every other one already said "acknowledgments". Prose only: no identifier is renamed here. Left alone deliberately are "grey" (a valid matplotlib color name, and the spelling the plotting code already uses), the "Catalogue of Lattices" (a proper name, and a knowl id), the Centre... institution names in workshops.html, maths.* URLs and e-mail addresses, the sympow readme quoted in symL, and the vendored snap.svg/markitup JavaScript. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follow-on to the prose pass, kept separate so it can be dropped on its own. Every name here has all of its references inside a single file (or, for favourite_list, one view and its template), so each rename is the definition and its uses together: draw_spectrum.py centre_ratio, y_centre -> center_ratio, y_center WebEllipticCurve.py EC_R_plot's colour parameter -> color web_newform.py factorisation loop variable -> factorization galois_reps.py renormalise_coefficients -> renormalize_coefficients search_wrapper.py query_cancelled_error -> query_canceled_error hecke_algebras favourite_list -> favorite_list (view + template) test_st.py test_favourites -> test_favorites query_cancelled_error is worth a look: it handles psycopg's QueryCanceledError, which spells it with one l, so the handler and the exception now agree. Not renamed: signtocolour, which lmfdb/utils/__init__.py exports in __all__ and five modules import. Renaming it is an API change rather than a spelling fix, so it and the locals built on it (signcolour, thiscolour, colourplus, colourminus, test_signtocolour) are left for a separate decision. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
|
I had GPT review; it found no blockers. It noted that if there are any external scripts calling the renamed functions they would break; I don't think that's an issue for us with these functions. |
Contributor
|
Are tests running on this PR? I don't see them running but also don't see the button with the usual method to force them to run. Otherwise the PR LGTM. |
Member
|
There's a major Github outage; no tests are running anywhere as of a few hours ago. |
Contributor
|
Got it! Once the tests pass this looks like it can be merged. |
GitHub Actions was disabled during a recent outage; this empty commit kicks the checks back into running.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LMFDB uses American spelling, but British forms had accumulated in comments, docstrings, page text, and a few identifiers. This sweeps them up.
Two commits, so the second can be dropped on its own if you would rather not touch identifiers:
1. Prose (58 lines, 38 files) — comments, docstrings, and user-facing text:
behaviour,centre/centred,colour,favourite,fibre,judgement,labelled/labelling,amongst,whilst,acknowledgements, and the-isefamily (initialise,normalise,renormalise,factorise,recognise,prioritise,optimise,standardise,desynchronise).Two of these were also wrong on the facts:
CONTRIBUTORS.yamlheader points readers at/acknowledgement, but the route is/acknowledgment(lmfdb/app.py:443).One rewrite rather than a straight swap:
tensor_products_navigate.htmlsaid "may take a while to load whilst the zeros are computed", where "while ... while" would have read badly, so it is now "as the zeros are computed".2. Identifiers (27 lines, 8 files) — every name here has all of its references inside one file, or for
favourite_listone view and its template, so each rename moves the definition and its uses together:draw_spectrum.pycentre_ratio,y_centre→center_ratio,y_centerWebEllipticCurve.pyEC_R_plot'scolourparameter →colorweb_newform.pyfactorisationloop variable →factorizationgalois_reps.pyrenormalise_coefficients→renormalize_coefficientssearch_wrapper.pyquery_cancelled_error→query_canceled_errorhecke_algebrasfavourite_list→favorite_list(view + template)test_st.pytest_favourites→test_favoritesquery_cancelled_erroris worth a look: it handles psycopg'sQueryCanceledError, which spells it with onel, so the handler and the exception it catches now agree.Deliberately left alone
signtocolour, whichlmfdb/utils/__init__.pyexports in__all__and five modules import. Renaming it is an API change rather than a spelling fix, so it and the locals built on it (signcolour,thiscolour,colourplus,colourminus,test_signtocolour) are left for a separate decision.grey, a valid matplotlib color name and already the spelling the plotting code uses (abvar/fq/isog_class.py,hypergm/web_family.py,local_fields/main.py, and agreyattribute inutils/color.py).lattice.catalogue_of_lattices), and theInternational Centre .../Centre De Recherches Mathematiquesinstitution names inworkshops.html.maths.*URLs and e-mail addresses, the sympow readme quoted insymL/sympowlmfdb.py, and the vendoredsnap.svg-min.js/jquery.markitup.js.cancellation,characteristic,totally,analogue, andlabellist(which is a label list, not a labelling).How the list was built
Three independent passes over every tracked text file, so a gap in one is caught by another: an explicit British-to-American word list; a suffix sweep (
-ise,-our,-tre,-lled,-ogue,-yse) over every distinct word, which is what caughttest_favourites, a plural the word list missed; and a substring sweep for British stems buried inside identifiers, which caughtfavourite_listandquery_cancelled_error. Each hit was checked by hand before being changed.Checks
pyflakesclean on all 34 changed Python files, all 8 changed templates parse,CONTRIBUTORS.yamlstill loads (123 documents), and no reference to any renamed identifier remains.🤖 Generated with Claude Code